home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / muds / lpmud312.tar / lpmud312 / comm.h < prev    next >
C/C++ Source or Header  |  1991-11-29  |  2KB  |  49 lines

  1. #include <sys/socket.h>
  2. #ifdef _AIX
  3. #include <sys/socketvar.h>
  4. #endif
  5. #include <netinet/in.h>
  6. #include <arpa/inet.h>
  7.  
  8. #define MAX_TEXT    2048
  9.  
  10. #define MAX_SOCKET_PACKET_SIZE    1024    /* Wild guess. */
  11. #define DESIRED_SOCKET_PACKET_SIZE 800
  12.  
  13. #define MESSAGE_FLUSH ((char*)NULL)
  14.  
  15. struct interactive {
  16.     int socket;
  17.     struct object *ob;        /* Points to the associated object */
  18.     struct sentence *input_to;    /* To be called with next input line ! */
  19.     struct sockaddr_in addr;
  20.     char *prompt;
  21.     int closing;        /* True when closing this socket. */
  22.     int do_close;        /* This is to be closed down. */
  23.     char text[MAX_TEXT];
  24.     int text_end;        /* first free char in buffer */
  25.     int text_start;        /* where we are up to in player cmd buffer */
  26.     struct interactive *snoop_on, *snoop_by;
  27. #ifdef PORTALS
  28.     int from_portal;        /* True if this player has arrived through a portal */
  29.     int portal_socket;        /* All messages should go through this socket, if open */
  30.     int out_portal;        /* True if going out through a portal. */
  31. #endif /* PORTALS */
  32.     int noecho;            /* Don't echo lines */
  33.     int last_time;        /* Time of last command executed */
  34.     char *default_err_message;    /* This or What ? is printed when error */
  35. #ifdef ACCESS_RESTRICTED
  36.     void *access_class;         /* represents a "cluster" where this player comes from */                              
  37. #endif
  38.     int trace_level;        /* Debug flags. 0 means no debugging */
  39.     char *trace_prefix;        /* Trace only object which has this as name prefix */
  40.     struct ed_buffer *ed_buffer;    /* Local ed */
  41.     int message_length;
  42.     char message_buf[DESIRED_SOCKET_PACKET_SIZE+1];
  43.     struct object *next_player_for_flush, *previous_player_for_flush;
  44. #ifdef MUDWHO
  45.     int login_time;
  46. #endif
  47. };
  48.  
  49.